home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-15 / voltst10.zip / VOLTEST.DOC < prev   
Text File  |  1992-10-12  |  4KB  |  96 lines

  1.  
  2.                          VOLTEST 1.0 - Volume Tester
  3.                                 by Dan Goodell    
  4.  
  5.  
  6.      VolTest is a utility to check the volume label on a disk and
  7.      optionally compare it to a requested name.   VolTest returns an
  8.      errorlevel code for batch file use, but can also be used to set
  9.      an environment variable with the label of the disk in the drive,
  10.      if necessary.  VolTest can read the true label, including any
  11.      leading, trailing, or embedded spaces, which can confuse other
  12.      label-matchers.
  13.  
  14.      Syntax:  VOLTEST [?] [d:][matchname]
  15.  
  16.      where:   [?]             displays help screen,
  17.               [d:]            is the drive specifier, and
  18.               [matchname]     is the volume label to try and match.
  19.  
  20.      Parameters are optional.  If no drive is specified, the default drive
  21.      is tested.  Note that '?' and '*' are bonafide characters in labels
  22.      and are not considered wildcards.  Volume labels may include spaces.
  23.      A label may validly begin with leading spaces, so no spaces should be
  24.      inserted between [d:] and [matchname] unless meant to be part of the
  25.      name to match.
  26.  
  27.      When called from a batch file, VolTest returns an exit code that can
  28.      be tested with the "if errorlevel..." command.  The errorlevel code
  29.      is based on the result of a case-sensitive test:
  30.  
  31.           3 = no volume label found
  32.           2 = label found, match not requested
  33.           1 = label found, does not match request
  34.           0 = label found, matches request
  35.  
  36.  
  37.      Usage and screen output examples:    Explanation:
  38.      -----------------------------------  --------------------------------
  39.  
  40.      C> voltest Data Disk 1               Default drive label matches
  41.      SET LABEL=Data Disk 1                the name requested.
  42.  
  43.      C> voltest A:PROGRAMS?               Drive A: label does not match.
  44.      SET LABEL=VIP*TEXT                   '?' and '*' are not wildcards.
  45.      :Label does not match "PROGRAMS?  "
  46.  
  47.      C> voltest z:                        Drive Z: does not exist or
  48.      SET LABEL=                           has no label.
  49.  
  50.      C> voltest E:    Set #1              E: label (with 2 leading spaces)
  51.      SET LABEL=  My Data                  does not match the requested
  52.      :Label does not match "    Set #1 "  name (with 4 leading spaces).
  53.  
  54.      C> voltest > setenv.bat              Label from default drive is sent
  55.                                           to a batch file.  Calling that
  56.                                           file will store the label in an
  57.                                           environment variable.
  58.  
  59.      C> voltest a:> setenv.bat            Label from drive A: is sent to a
  60.                                           batch file.  Note that putting a
  61.                                           space after 'a:' would cause
  62.                                           VolTest to try to match a label
  63.                                           of only (one or more) spaces.
  64.  
  65.      C> voltest b:DATA #001 > nul         Tests B: for label "DATA #001  "
  66.                                           but not displayed on the screen.
  67.                                           As in all examples, errorlevel
  68.                                           can be tested if VolTest is
  69.                                           called from within a batch file.
  70.  
  71.      ---------------------------------------------------------------------
  72.  
  73.      VolTest is supplied as is.  The author disclaims all warranties,
  74.      expressed or implied, including, without limitation, the warranties
  75.      of suitability for any purpose.  The author assumes no liability for
  76.      damages, direct or consequential, which may result from the use of
  77.      this program.  Users of this program must accept this disclaimer of
  78.      warranty.
  79.  
  80.      This program is hereby released into the public domain.  Feel free to
  81.      alter, edit, or distribute it (hopefully, with this documentation) as
  82.      you wish.
  83.  
  84.      If you have any comments or questions about this program, please
  85.      contact me at CompuServe [71520,3116] or the address shown below.
  86.  
  87.  
  88.                                October 12, 1992
  89.  
  90.                                 by Dan Goodell    
  91.                               1261 Hookston Road  
  92.                               Concord, CA  94518  
  93.                             CompuServe: 71520,3116
  94.  
  95.  
  96.